<%@ page pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
    <head>
        <title>数据提交</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="stylesheet" href="../css/upload_data.css"/>
        <link rel="stylesheet" type="text/css" href="../css/footer.css"/>
        <link rel="stylesheet" type="text/css" href="../css/header.css"/>
        <script type="text/javascript" src="../javascript/jquery.min.js"></script>
        <script type="text/javascript" src="../javascript/ddaccordion.js"></script>        
        <script language="javascript">
            //Initialize Arrow Side Menu:
            ddaccordion.init({
                headerclass: "menuheaders", //Shared CSS class name of headers group
                contentclass: "menucontents", //Shared CSS class name of contents group
                revealtype: "clickgo", //Reveal content when user clicks or onmouseover the header? Valid value: "click", or "mouseover"
                mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
                collapseprev: true, //Collapse previous content (so only one open at any time)? true/false 
                defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc]. [] denotes no content.
                onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
                animatedefault: false, //Should contents open by default be animated into view?
                persiststate: true, //persist state of opened contents within browser session?
                toggleclass: ["unselected", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
                togglehtml: ["none", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
                animatespeed: 500, //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
                oninit:function(expandedindices){ //custom code to run when headers have initalized
                    //do nothing
                },
                onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
                    //do nothing
                }
            })
        
            function f_display(myspan)
            {
                document.getElementById('e_downlaod').style.display="none";
                document.getElementById('e_upload').style.display="none";
                document.getElementById('f_download').style.display="block";
                document.getElementById('f_upload').style.display="block";

                /*var link=document.getElementsByTagName('span');
                for(var i=0;i<link.length;i++)
                    link[i].style.background="#AE0000";
                myspan.style.background="forestgreen";*/
            }
            //为环境财务模块显示 做不同的处理
            function e_display(myspan)
            {
                document.getElementById('e_downlaod').style.display="block";
                document.getElementById('e_upload').style.display="block";
                document.getElementById('f_download').style.display="none";
                document.getElementById('f_upload').style.display="none";

                /*var link=document.getElementsByTagName('span');
                for(var i=0;i<link.length;i++)
                    link[i].style.background="#AE0000";
                myspan.style.background="forestgreen";*/
            }

            //通过submit显示上传界面，改变每张上传表单的display
            function e_upload(form_Id)
            {
                var tempId="e"+form_Id;
                document.getElementById(tempId).style.display="block";
            }
            
            function f_upload(form_Id)
            {
                var tempId="f"+form_Id;
                document.getElementById(tempId).style.display="block";                
            }
        </script>

        <style type="text/css">

            .arrowsidemenu{
                width: 180px; /*width of menu*/
                border-style: solid solid none solid;
                border-color: #94AA74;
                border-size: 1px;
                border-width: 1px;
            }

            .arrowsidemenu div a{ /*header bar links*/
                font: bold 12px Verdana, Arial, Helvetica, sans-serif;
                display: block;
                background: transparent url(../image/arrowgreen.gif) 100% 0;
                height: 24px; /*Set to height of bg image-padding within link (ie: 32px - 4px - 4px)*/
                padding: 4px 0 4px 10px;
                line-height: 24px; /*Set line-height of bg image-padding within link (ie: 32px - 4px - 4px)*/
                text-decoration: none;
            }

            .arrowsidemenu div a:link, .arrowsidemenu div a:visited{
                color: #26370A;
            }

            .arrowsidemenu div a:hover{
                background-position: 100% -32px;
            }

            .arrowsidemenu div.unselected a{ /*header that's currently not selected*/
                color: #6F3700;
            }


            .arrowsidemenu div.selected a{ /*header that's currently selected*/
                color: blue;
                background-position: 100% -64px !important;
            }

            .arrowsidemenu ul{
                list-style-type: none;
                margin: 0;
                padding: 0;
            }

            .arrowsidemenu ul li{
                border-bottom: 1px solid #a1c67b;
            }


            .arrowsidemenu ul li a{ /*sub menu links*/
                display: block;
                font: normal 12px Verdana, Arial, Helvetica, sans-serif;
                text-decoration: none;
                color: black;
                padding: 5px 0;
                padding-left: 10px;
                border-left: 10px double #a1c67b;
            }

            .arrowsidemenu ul li a:hover{
                background: #d5e5c1;
            }

        </style>        
    </head>
    <body>
        <div id="container">
            <div id="header">
                <div id="logo">              
                </div>
                <div id="menu">
                    <ul>
                        <li class="gogo" id="i0" onmouseover="let('i0')" onmouseout="gogo('i0')"><a href="../login">企业首页</a></li>
                        <li class="gogo" id="i1" onmouseover="let('i1')" onmouseout="gogo('i1')"><a href="../financial/lookup_Financial">企业财务</a></li>
                        <li class="gogo" id="i2" onmouseover="let('i2')" onmouseout="gogo('i2')"><a href="../environment/lookup_Environment">社会环境</a></li>
                        <li class="gogo" id="i3" onmouseover="let('i3')" onmouseout="gogo('i3')"><a href="lookup_Upload">数据提交</a></li>
                        <li class="gogo" id="i4" onmouseover="let('i4')" onmouseout="gogo('i4')"><a href="../warning/lookup_Warning">警告预警</a></li>
                        <li class="gogo" id="i5" onmouseover="let('i5')" onmouseout="gogo('i5')"><a href="../customer/lookup_RepaymentRecord">还贷情况</a></li>
                    </ul>
                </div>
            </div>
            <div id="main">
                <div id="left_menu">
                    <div style="height:60px;width:100%;background:url(../image/left2.png);">
                    </div>  
                    <div style="height:400px;width:100%;background:url(../image/left3.png);"> <br><br>
                        <div class="arrowsidemenu">
                            <div class="menuheaders"><a href="javascript:" title="Home" onClick="e_display(this);">环境报表提交</a></div>
                            
                            <div class="menuheaders"><a href="javascript:" title="Home" onClick="f_display(this);">财务报表提交</a></div>
                        </div><br><br><br><br><br>
                        <div style="height:200px;width: 100%;background: url(../image/leftchange.png);"></div> 
                                                  
                    </div>
                    <div style="height:200px;width: 100%;background:url(../image/changebottom.png) no-repeat left;"></div>                 
                </div>
                
                <div id="right-table">  
                <div style="width:100%;height:130px;background:url(../image/righthead.png);"></div>
                <div style="width:100%;background:url(../image/rights.png);">
                <div id="download">
                    <div id="e_downlaod" style="display:block;">
                        <table width="90%"  cellpadding="2px" cellspacing="0px" style="font-size:13px;font-family:Arial, Helvetica, sans-serif;color:#408080;">
                            <tr>
                                <td>
                                    <p style="font-size:14px;font-family:Arial, Helvetica, sans-serif;color:#4F4F4F;">
                                        <b> 请下载环境相关报表的xls规格文档：</b><br>
                                    </p>
                                </td>
                                <td>
                                    <a href="download_Environment">环境报表模板.xls</a>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div id="f_download" style="display:none;">
                        <table width="90%"  cellpadding="2px" cellspacing="0px" style="font-size:13px;font-family:Arial, Helvetica, sans-serif;color:#408080;">
                            <tr>
                                <td>
                                    <p style="font-size:14px;font-family:Arial, Helvetica, sans-serif;color:#4F4F4F;">
                                        <b> 请下载财务相关报表的xls规格文档：</b><br>
                                    </p>
                                </td>
                                <td>
                                    <a href="download_Financial">财务报表模板.xls</a>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>

                <div id="upload">
                    <table width="95%">
                        <tr>
                            <td>
                                <div id="e_upload" style="display:block;">
                                    <!--此处struts2循环 获得用户提交数据的历史记录及审核记录，方便企业核对其提交数据的指标-->
                                    <s:iterator value="eexcelList" var="temp" status="status">
                                        <table width="80%" cellpadding="2px" cellspacing="0px" border="1px solid"text-align="center" bordercolor="#4F4F4F" style="font-size:13px;font-family:Arial, Helvetica, sans-serif;color:black;font-weight:600;" class="sortable">
                                            <tr>
                                                <td width="50%">描述</td>
                                                <td width="50%"><s:property value="#temp.deadline.toString().substring(0, 4)" />年
                                                    <s:property value="#temp.deadline.toString().substring(5, 7)" />月环境报表
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>期限</td>
                                                <td><s:property value="#temp.deadline" /></td>
                                            </tr>
                                            <tr>
                                                <td>提交</td>
                                                <td><s:property value="#temp.submitDate" /></td>
                                            </tr>
                                            <tr>
                                                <td>审核</td>
                                                <td><s:if test="#temp.checked==false">
                                                        未审核
                                                    </s:if>
                                                    <s:else>
                                                        已审核
                                                    </s:else>
                                            </tr>
                                            <tr>
                                                <td>提交报表</td>
                                                <td>
                                                    <s:if test="#temp.expired == false && #temp.submitDate == null">
                                                        <p style="cursor: pointer;" onClick="e_upload(<s:property value='#status.index'/>);"><a href="javascript:"><b>提交</b></a></p>
                                                    </s:if>
                                                    <s:elseif test="#temp.expired == false && #temp.submitDate != null">
                                                        <p style="cursor: pointer;" onClick="e_upload(<s:property value='#status.index'/>);"><a href="javascript:"><b>重新提交</b></a></p>
                                                    </s:elseif>
                                                    <s:else>
                                                        <p style="cursor: pointer;"><a href="javascript:"><b>期限已过</b></a></p>
                                                    </s:else>
                                                </td>
                                            </tr>
                                        </table><br><br>
                                        <div id="e<s:property value='#status.index'/>" style="display:none;">
                                            <form action="upload_Environment" method="post" enctype="multipart/form-data">
                                                <input type="file" name="upload"/>&nbsp&nbsp&nbsp&nbsp&nbsp
                                                <input type="hidden" name="eexcelId" value="<s:property value="#temp.id" />" />
                                                <input type="submit" name="submit" value="上传"/>
                                            </form>
                                        </div><br>
                                    </s:iterator>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <div id="f_upload" style="display:none;">
                                    <s:iterator value="fexcelList" var="temp" status="status">
                                        <table width="80%" cellpadding="2px" cellspacing="0px" border="1px solid"text-align="center" bordercolor="#4F4F4F" style="font-size:13px;font-family:Arial, Helvetica, sans-serif;color:black;font-weight:600;" class="sortable">
                                            <tr>
                                                <td width="50%">描述</td>
                                                <td width="50%"><s:property value="#temp.deadline.toString().substring(0, 4)" />年
                                                    <s:property value="#temp.deadline.toString().substring(5, 7)" />月财务报表
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>期限</td>
                                                <td><s:property value="#temp.deadline" /></td>
                                            </tr>
                                            <tr>
                                                <td>提交</td>
                                                <td><s:property value="#temp.submitDate" /></td>
                                            </tr>
                                            <tr>
                                                <td>审核</td>
                                                <td><s:if test="#temp.checked==false">
                                                        未审核
                                                    </s:if>
                                                    <s:else>
                                                        已审核
                                                    </s:else>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>提交报表</td>
                                                <td>
                                                    <s:if test="#temp.expired == false && #temp.submitDate == null">
                                                        <p style="cursor: pointer;" onClick="f_upload(<s:property value='#status.index'/>);"><a href="javascript:"><b>提交</b></a></p>
                                                    </s:if>
                                                    <s:elseif test="#temp.expired == false && #temp.submitDate != null">
                                                        <p style="cursor: pointer;" onClick="f_upload(<s:property value='#status.index'/>);"><a href="javascript:"><b>重新提交</b></a></p>
                                                    </s:elseif>
                                                    <s:else>
                                                        <p style="cursor: pointer;"><a href="javascript:"><b>期限已过</b></a></p>
                                                    </s:else>
                                                </td>
                                            </tr>
                                        </table><br><br>
                                        <div id="f<s:property value='#status.index'/>" style="display:none;">
                                            <form action="upload_Financial" method="post" enctype="multipart/form-data">
                                                <input type="file" name="upload"/>&nbsp&nbsp&nbsp&nbsp&nbsp
                                                <input type="hidden" name="fexcelId" value="<s:property value="#temp.id" />" />
                                                <input type="submit" name="submit" value="上传"/>
                                            </form>
                                        </div><br>                                      
                                    </s:iterator>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
                </div> 
               <div style="width:100%;height:226px;background:url(../image/right2.png);"></div> 
              </div>     
            </div>

            <div id="footer">
                <table id="footer-container" border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
                    <tbody>
                        <tr>
                            <td>
                                <table class="foot-links" border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tbody>
                                        <tr>
                                            <td><a href="http://www.citigroup.com/" target="_blank">Citigroup.com</a></td>
                                            <td><ul>
                                                    <li><a href="http://www.citi.com.cn/html/cn/about_us/citi_group.html">关于花旗</a></li>
                                                    <li><a href="http://www.citi.com.cn/html/cn/HR/HR.html" target="_blank">加入花旗</a></li>
                                                    <li><a href="https://www.citibank.com.cn/CNGCB/APPS/portal/loadPage.do?path=/info/det/atm_network.htm">分行位置</a></li>
                                                    <li><a href="http://www.citibank.com.cn/chinese/footer/sitemap.htm">网站导航</a></li>
                                                    <li><a href="http://www.citibank.com.cn/chinese/footer/privacy.htm">隐私保护</a></li>
                                                    <li><a href="http://www.citibank.com.cn/chinese/footer/terms.htm">条件与条款</a></li>
                                                </ul>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <table border="0" cellpadding="0" cellspacing="0" width="100%">
                                    <tbody>
                                        <tr>
                                            <td class="footer-logo"><img src="../image/logo_footer.gif" alt="Citi" title="Citi"></td>
                                            <td class="foot-gray" align="right">沪ICP备05047918<br>
                                                Copyright ? 2011 Citigroup Inc.</td>
                                        </tr>
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>

    </body>
</html>
